//
// Created by 21577 on 2025/3/6.
//
#include<stdio.h>

int main() {
    int n;
    int a[100005];
    scanf("%d", &n);
    for (int i = 0; i < n; i++) {
        scanf("%d", &a[i]);
    }
    for (int j = 0; j < n - 1; j++) {
        int max= a[j] - a[j + 1];
        for (int k = j + 1; k < n; k++) {
            int cha = a[j] - a[k];
            if (cha > max)
                max = cha;
        }
        printf("%d ", max);
    }
    printf("no");
    return 0;
}